import {
  locale,
  Form,
  FormItem,
  Button,
  Input,
  Select,
  Option,
  Dialog,
  Autocomplete,
  Checkbox,
  CheckboxGroup,
  Image,
  Loading,
  Upload,
  Table,
  TableColumn,
  Tabs,
  TabPane,
  Menu,
  MenuItem,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Pagination,
  Row,
  Col,
  Popover,
  Badge,
  InfiniteScroll,
  Radio,
  RadioGroup,
  DatePicker,
  ButtonGroup,
  Tooltip
} from 'element-ui'
import i18n from '@/lang'

const Element = {
  install (Vue) {
    // 设置语言
    locale(i18n.messages[i18n.locale])
    Vue.use(ButtonGroup)
    Vue.use(DatePicker)
    Vue.use(Form)
    Vue.use(FormItem)
    Vue.use(Button)
    Vue.use(Input)
    Vue.use(Select)
    Vue.use(Option)
    Vue.use(Dialog)
    Vue.use(Autocomplete)
    Vue.use(CheckboxGroup)
    Vue.use(Checkbox)
    Vue.use(Image)
    Vue.use(Loading)
    Vue.use(Upload)
    Vue.use(Table)
    Vue.use(TableColumn)
    Vue.use(Tabs)
    Vue.use(TabPane)
    Vue.use(Menu)
    Vue.use(MenuItem)
    Vue.use(Dropdown)
    Vue.use(DropdownMenu)
    Vue.use(DropdownItem)
    Vue.use(Pagination)
    Vue.use(Row)
    Vue.use(Col)
    Vue.use(Popover)
    Vue.use(Badge)
    Vue.use(InfiniteScroll)
    Vue.use(Radio)
    Vue.use(RadioGroup)
    Vue.use(Tooltip)
  }
}
export default Element
